from django.db import models


class ServiceInfo(models.Model):
    """
    服务配置
    """

    name = models.CharField(
        '分类名称',
        max_length=100,
        default='',
    )

    order = models.IntegerField(
        '分类排序',
        default=0,
    )

    operate_time = models.DateTimeField(
        '操作时间',
        null=True,
        auto_now_add=True,
    )

    def __str__(self):
        return '%s' % (self.name,)

    class Meta:
        verbose_name = '服务配置'
        verbose_name_plural = verbose_name
        ordering = ('order',)
